cmake_minimum_required(VERSION 3.13)
project(QtDemo)
set(TARGET QtDemo)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOMOC ON)
FILE(GLOB SOURCES ./*.cpp ./*.h )
set(QT Core Gui Widgets)


find_package(Qt5 REQUIRED ${QT})
FILE(GLOB RESOURCES ./*.qrc )
qt5_add_resources(qrc_FILES ${RESOURCES})
add_executable(${TARGET} ${SOURCES} ${qrc_FILES})
qt5_use_modules(${TARGET} ${QT})